<?php

namespace Common\Generator;

use Common\Observer\Observer;

abstract class EventGenerator
{

    private $observers = array();
    public function addObserver(Observer $observer)
    {
        $this->observers[] = $observer;
    }

    public function notify($str)
    {
        foreach ($this->observers as $observer) {
            $observer->update($str);
        }
    }
}
